package cn.cocho.android.mct.comp.edit;

import cn.cocho.android.mct.R;
import cn.cocho.android.mc.comp.edit.EditTextAttach;
import cn.cocho.android.mc.comp.edit.EditTextAttach.OnDrawableListener;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;

public class EditTextWithClearTest extends Activity{
	
	@Override
	protected void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.edit_text_with_clear);
		
		caseEditTextAttach();
	}
	
	public void caseEditTextAttach() {
		final EditTextAttach editAttach = (EditTextAttach) findViewById(R.id.editTextAttach);
		editAttach.setOnDrawableListener(new OnDrawableListener() {
			@Override
			public void onClick() {
				// TODO Auto-generated method stub
				System.out.println("在这里实现点击右侧drawable触发的事件。");
				System.out.println("editAttach.getText():"+editAttach.getText());
				Toast.makeText(EditTextWithClearTest.this, "在这里实现点击右侧drawable触发的事件。", Toast.LENGTH_SHORT).show();
			}
		});
	}
}
